
def hanoi(n, source, buffer, target):
    if n == 1:
        print(f"从2 {source} 移动到 {target}")
    else:
        hanoi(n - 1, source, target, buffer)
        print(f"从1 {source} 移动到 {target}")
        hanoi(n - 1, buffer, source, target)


hanoi(2, 'A', 'B', 'C')
